uniform bool useBackgroundTexture;
uniform sampler2D backgroundTexture;

varying vec4 fragColor;
varying vec4 fragTexuv;

void main( void )
{
    if (useBackgroundTexture) {
        vec4 texColor = texture2D(backgroundTexture, fragTexuv);
        gl_FragColor = texColor * fragColor; 
    }
    else {
        gl_FragColor = fragColor;
    }
}